package work20241126_27;

import java.util.Arrays;

/**
 * @author zdl
 * @date 2024/11/26
 */
public class Demo13 {
    public static void main(String[] args) {
        //反转一个数组并输出。
        int[] arr = {1,3,2,6};
        for (int i = 0; i < arr.length / 2; i++) {
            int temp = arr[i];
            arr[i] = arr[arr.length-1-i];
            arr[arr.length-1-i] = temp;
        }
        System.out.println(Arrays.toString(arr));
    }
}
